//package com.cbgolf.mannger.adapter;
//
///**
// * Created by lq on 2017/11/1.
// */
//
//import android.content.Context;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.View.OnClickListener;
//import android.view.ViewGroup;
//import android.widget.ImageView;
//import android.widget.LinearLayout;
//import android.widget.TextView;
//
//import com.cbgolf.mannger.R;
//import com.cbgolf.mannger.entity.ShopBean;
//import com.cbgolf.mannger.util.TextUtil;
//import com.cbgolf.mannger.util.Util;
//
//import java.util.ArrayList;
//import java.util.List;
//
//public class LeftSectionedAdapter extends SectionedBaseAdapter {
//    private Context mContext;
//    List<ShopBean> list = new ArrayList<>();
//    private LayoutInflater mInflater;
//
//    public LeftSectionedAdapter(Context context) {
//        this.mContext = context;
//        mInflater = LayoutInflater.from(context);
//    }
//
//    public void setList(List<ShopBean> list) {
//        this.list = list;
//        this.notifyDataSetChanged();
//    }
//
//    public void clear() {
//        if (!Util.listIsNull(list)) {
//            list.clear();
//        }
//    }
//
//    @Override
//    public Object getItem(int section, int position) {
//        return list.get(position);
//    }
//
//    @Override
//    public long getItemId(int section, int position) {
//        return position;
//    }
//
//    @Override
//    public int getSectionCount() {
//        return list.size();
//    }
//
//    @Override
//    public int getCountForSection(int section) {
//        return !Util.listIsNull(list.get(section).goods) ? list.get(section).goods.size() : 0;
//    }
//
//    @Override
//    public View getItemView(final int section, final int position, View convertView, ViewGroup parent) {
//        final ViewHolder viewHolder;
//        if (convertView == null) {
//            convertView = mInflater.inflate(R.layout.item_left, null);
//            viewHolder = new ViewHolder();
//            viewHolder.image = (ImageView) convertView.findViewById(R.id.item_left_iv);
//            viewHolder.name = (TextView) convertView.findViewById(R.id.item_left_tv);
//            convertView.setTag(viewHolder);
//        } else {
//            viewHolder = (ViewHolder) convertView.getTag();
//        }
//        viewHolder.name.setText(TextUtil.Text(list.get(section).goodsTypeName));
//        convertView.setOnClickListener(new OnClickListener() {
//            @Override
//            public void onClick(View arg0) {
//
//            }
//        });
//        return convertView;
//    }
//
//    class ViewHolder {
//        public TextView name;
//        public ImageView image;
//
//    }
//
//    //这里主要是右边ListView头部分类信息展示的实现
//    @Override
//    public View getSectionHeaderView(int section, View convertView, ViewGroup parent) {
//        LinearLayout layout = null;
////        if (convertView == null) {
////            LayoutInflater inflator = (LayoutInflater) parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
////            layout = (LinearLayout) inflator.inflate(R.layout.header_item, null);
////        } else {
////            layout = (LinearLayout) convertView;
////        }
////        layout.setClickable(false);
////        ((TextView) layout.findViewById(R.id.textItem)).setText(pruductCagests.get(section).getCagName());
//        return layout;
//    }
//
//}